package com.fire.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.fire.HelloService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/hello")
public class HelloController {
    @Reference//查找服务
    private HelloService helloService;


    @RequestMapping("/he")
    @ResponseBody
    public String sayHello(String name){
//        远程调用
        String fire = helloService.sayHello(name);
        System.out.println(fire);
        return fire;
    }
}
